<template>
	<view class="page">
		<view class="page-content">
			<uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据" >
				<uni-tr>
					<template v-if="searchType === 'weixiu'">
						<uni-th align="center">故障类型</uni-th>
						<uni-th align="center">状态</uni-th>
						<uni-th align="center">设备</uni-th>
					</template>
					<template v-if="searchType === 'xunjian'">
						<uni-th align="center">设备名称</uni-th>
						<uni-th align="center">状态</uni-th>
						<uni-th align="center">描述</uni-th>
					</template>
					<template v-if="searchType === 'tianjia'">
						<uni-th align="center">编码</uni-th>
						<uni-th align="center">名称</uni-th>
					</template>
					<uni-th align="center">详情</uni-th>
				</uni-tr>
				<uni-tr v-for="(item, index) in tableData" :key="index">
					<template v-if="searchType === 'weixiu'">
						<uni-td align="center">{{ item.gzlx_dictText }}</uni-td>
						<uni-td align="center">{{ item.clzt_dictText }} </uni-td>
						<uni-td align="center">{{ item.sbid_dictText }} </uni-td>
					</template>
					<template v-if="searchType === 'xunjian'">
						<uni-td align="center">{{ item.sbid_dictText }}</uni-td>
						<uni-td align="center">{{ item.sbzt_dictText }} </uni-td>
						<uni-td align="center">{{ item.fault_dictText }} </uni-td>
					</template>
					<template v-if="searchType === 'tianjia'">
						<uni-td align="center">{{ item.sbbh }}</uni-td>
						<uni-td align="center">{{ item.sbmc }}</uni-td>
					</template>
					<uni-td align="center">
						<button size="mini" type="primary" @click="onDetail(item)">详情</button>
					</uni-td>
					
				</uni-tr>
			</uni-table>
			<view class="uni-pagination-box">
				<uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" />
			</view>
			<view class="submit" @click="$tool.goBack()">返  回</view>
		</view>
	</view>
</template>
<script src='./index.js'></script>
<style lang="less" src="./index.less"></style>